package com.example.demo.entity;

import javax.persistence.*;
import java.util.List;

/**
 * Created by pengwan on 2017/8/2.
 */
@NamedEntityGraph(
        attributeNodes = {@NamedAttributeNode("projects")}
)
@Entity
@Table(name = "employee")
public class Employee extends EntityId{
    @Column(name = "employee_name")
    private String employeeName;
    @OneToMany()
    private List<Project> projects;
    @OneToMany
    private List<PhoneNumber> phoneNumbers;

    public String getEmployeeName() {
        return employeeName;
    }

    public void setEmployeeName(String employeeName) {
        this.employeeName = employeeName;
    }

    public List<Project> getProjects() {
        return projects;
    }

    public void setProjects(List<Project> projects) {
        this.projects = projects;
    }

    public List<PhoneNumber> getPhoneNumbers() {
        return phoneNumbers;
    }

    public void setPhoneNumbers(List<PhoneNumber> phoneNumbers) {
        this.phoneNumbers = phoneNumbers;
    }
}
